package com.atguigu.springcloud;

import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration;
import org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration;
import org.springframework.cloud.config.server.EnableConfigServer;

/**
 * 配置中心  服务端
 *
 * cmd命令:
 *
 * 消息总线全局广播命令
 * 1.curl -X POST "http://localhost:3344/actuator/bus-refresh" 消息总线全局广播命令(一次广播,处处生效,全部通知)
 *
 * 定点通知
 * 2.curl -X POST "http://localhost:3344/actuator/bus-refresh/config-client:3355" 定点通知(只通知3355  不通知3366) 精准打击
 *
 *
 * 总结 :
 * 公式：http://localhost:配置中心的端口号/actuator/bus-refresh/{destination}
 */
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class,
        DataSourceTransactionManagerAutoConfiguration.class,
        DruidDataSourceAutoConfigure.class ,
        HibernateJpaAutoConfiguration.class})
@EnableConfigServer
public class ConfigMain {

    public static void main(String[] args) {
        SpringApplication.run(ConfigMain.class,args);
    }
}
